from datetime import datetime

import docx


class Text:  # 文本类
    def __init__(self):
        self.word = docx.Document()

    def addText(self):
        return self.word

    def saveText(self):
        # ../files/
        str = datetime.now().strftime("./files/%Y-%m-%d-%H-%M")
        filename = str + '.docx'
        self.word.save(filename)
        return "Conference papers are saved"


if __name__ == '__main__':
    test = Text()
    test.addText()
    test.saveText()
